package com.mtoanmy.multiviewcolumn;

import java.util.ArrayList;
import java.util.List;

import com.huewu.pla.lib.MultiColumnListView;
import com.mtoanmy.data.ObjItems;
import com.mtoanmy.myframework.R;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;

public class ActivityMultiView extends Activity {

	public List<ObjItems> lstData = new ArrayList<ObjItems>();
	private Context mContext;
	private Activity mActivity;
	private AdapterListMulti adapter;
	private MultiColumnListView listView;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);

		setContentView(R.layout.activity_lstmultiview);
		mContext = this;
		mActivity = this;
		
		initData();
		initLayout();
		initEvent();
	}

	private void initEvent() {
		// TODO Auto-generated method stub
		
	}

	private void initLayout() {
		// TODO Auto-generated method stub
		listView = (MultiColumnListView)findViewById(R.id.list_content);
		adapter = new AdapterListMulti(mContext,mActivity, lstData);
		listView.setAdapter(adapter);
	}

	private void initData() {
		// TODO Auto-generated method stub
		
	}
	
	public void updateAdapterListItems()
	{
		lstData.clear();
//		lstData.addAll(GlobalVariable.listDataContest);
		adapter.notifyDataSetChanged();
	}
}
